name: build

on:
  push:
    branches:
      - main
      - github_action
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Build dependencies
        run: |
          ./mcrouter/scripts/install_ubuntu_20.04.sh "$(pwd)"/mcrouter-install deps
      - name: Build mcrouter
        run: |
          mkdir -p "$(pwd)"/mcrouter-install/install
          ./mcrouter/scripts/install_ubuntu_20.04.sh "$(pwd)"/mcrouter-install mcrouter
